<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>用户管理</title>
	<%@ include file="/WEB-INF/include/include.jsp" %>
  </head>
  <body>
  	<div>aaa</div>
  	<div id="addForm" name="addForm" style="height: 100%;"></div>
  </body>
</html>
	<ui:page>
		<ui:formPanelServer id="userForm"  var="userForm" renderTo="addForm"  datasetName="SysUserDataSetHandler" datasetMethod="save" handlerName="SysUserLoadHandler" afterSubmitHandler="afterSubmitHandler">
			<x:attr name="region">south</x:attr>
			<x:attr name="bodyStyle">padding:5px</x:attr>
			<x:attr name="autoScroll" type="direct" >false</x:attr>			
			<x:items>
				<ui:formPanel.fieldset title="详细信息">
				<x:attr name="layout">
					<x:value type="direct">{type:'table',columns:3}</x:value>
				</x:attr>
				<x:attr name="fieldDefaults">
					<x:value type="direct">{margin:'5 5 5 5' }</x:value>
				</x:attr>
					<x:items>
						<ui:formPanel.text id="USER_CODE" fieldLabel="用户编码" allowBlank="false" />
						<ui:formPanel.text id="USER_NAME" fieldLabel="用户名称"  allowBlank="false"/>
						<ui:formPanel.orgTriggerField id="ORG_SIMPLE_NAME" fieldLabel="组织机构"  hiddenId="ORG_ID"></ui:formPanel.orgTriggerField>
						<ui:formPanel.sexCombox id="USER_SEX" fieldLabel="性别" allowBlank="false"></ui:formPanel.sexCombox>
						<ui:formPanel.text id="USER_TEL" fieldLabel="电话"/>
						<ui:formPanel.text id="USER_EMAIL" fieldLabel="邮件地址" >
							<x:attr name="vtype">email</x:attr>
						</ui:formPanel.text>
						<ui:formPanel.date id="USER_AVIDATE" fieldLabel="有效日期"/>
						<ui:formPanel.statusCombox id="C_STATUS" fieldLabel="状态" allowBlank="false"></ui:formPanel.statusCombox>
						<ui:formPanel.hidden id="USER_ID"/>
						<ui:formPanel.textarea id="C_REMARK" fieldLabel="备注" >
						<x:attr name="colspan" type="direct">3</x:attr>
						</ui:formPanel.textarea>
						<ui:formPanel.hidden id="ORG_ID"/>
						<ui:formPanel.hidden id="USER_TYPE"/>
					</x:items>
				</ui:formPanel.fieldset>
				
			</x:items>
			<x:attr name="buttons">
				<x:array>
					<ui:button text="保存" id="saveBtn" handler="doSubmit" />
					<ui:button text="取消"/>
				</x:array>
			</x:attr>
		</ui:formPanelServer>
		<x:bottomScript>
			function doSubmit(){
				userForm.submit();
			}
			function afterSubmitHandler(result){
				if( result.success ){
					Pearlsen.Utils.closeTab();
					return;
				}
				Pearlsen.Utils.showErrorMsg("出错了,原因:"+result.message);
				
			}
		
		</x:bottomScript>
</ui:page>

	
